package cn.zjh.feign;

import cn.zjh.domain.Store;
import cn.zjh.utils.JsonResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;


@Component
public class StoreServiceFallbackFactory implements FallbackFactory<StoreService> {

    @Override
    public StoreService create(Throwable throwable) {
        return new StoreService() {
            @Override
            public JsonResult add(Store store) {
                return new JsonResult(false, "我们正在殴打程序员，请稍后重试！");
            }
        };
    }
}
